#include "SharedFileList.h"

SharedFileList::SharedFileList() {

}

SharedFileList::~SharedFileList() {
	list.clear();
}

size_t SharedFileList::getSize()
{
	return list.size();
}

const char * SharedFileList::getFileName(size_t fileNum)
{
	if (fileNum < list.size())
	{
		return list[fileNum].path.c_str();
	}

	return ""; //WARNING!
}

int SharedFileList::getUserID(size_t fileNum)
{
	if (fileNum < list.size())
	{
		return list[fileNum].userID;
	}

	return -1;
}

void SharedFileList::pushBack(int userID, std::string &path)
{
	sharedFile file;

	file.path = path;
	file.userID = userID;

	list.push_back(file);

}

void SharedFileList::clear()
{
	list.clear();
}

